home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************
- This file was created automatically by `FlexCat V1.3'
- Do NOT edit by hand!
- ****************************************************************/
-
- #include <string.h>
-
- #include <exec/memory.h>
- #include <libraries/iffparse.h>
-
- #include <clib/iffparse_protos.h>
- #include <clib/locale_protos.h>
- #include <clib/dos_protos.h>
- #include <clib/exec_protos.h>
- #include <clib/utility_protos.h>
-
- #ifdef AZTEC_C
- #include <pragmas/locale_lib.h>
- #include <pragmas/iffparse_lib.h>
- #include <pragmas/dos_lib.h>
- #include <pragmas/exec_lib.h>
- #include <pragmas/utility_lib.h>
- #endif /* AZTEC_C */
-
- #if defined(__SASC) || defined(_DCC) || defined(__MAXON__)
- #include <pragmas/locale_pragmas.h>
- #include <pragmas/iffparse_pragmas.h>
- #include <pragmas/dos_pragmas.h>
- #include <pragmas/exec_pragmas.h>
- #include <pragmas/utility_pragmas.h>
- #endif /* __SASC || _DCC || __MAXON__ */
-
- #ifdef __GNUC__
- #include <inline/locale.h>
- #include <inline/iffparse.h>
- #include <inline/dos.h>
- #include <inline/exec.h>
- #include <inline/utility.h>
- #endif /* __GNUC__ */
-
-
- extern struct Library *UtilityBase;
- extern struct DosLibrary *DOSBase;
- extern struct ExecBase *SysBase;
-
-
-
-
- static LONG Chaos_Version = 8;
- static const STRPTR Chaos_BuiltInLanguage = (STRPTR) "english";
-
- struct FC_Type
- { LONG ID;
- STRPTR Str;
- };
-
- const struct FC_Type _MSG_CDAT_SELECTION = { 0, "Tournamentfile-selection" };
- const struct FC_Type _MSG_NO_WRITE_FILE = { 1, "Cannot open %s as write-file!\nDOS-Error %ld" };
- const struct FC_Type _MSG_WRITE_ERROR = { 2, "DOS-Error %ld while writing %s!" };
- const struct FC_Type _MSG_NO_READ_FILE = { 3, "Cannot open %s as read-file!\nDOS-Error %ld" };
- const struct FC_Type _MSG_NO_CHAOS_FILE = { 4, "%s is no Chaos-V5-file!" };
- const struct FC_Type _MSG_READ_ERROR = { 5, "DOS-Error %ld while reading %s!" };
- const struct FC_Type _MSG_ATTENTION = { 6, "Attention!" };
- const struct FC_Type _MSG_CHANGES_MADE = { 7, "Changes have been made!\nDo you want to save the tournament first?" };
- const struct FC_Type _MSG_YES_NO = { 8, "Yes|No" };
- const struct FC_Type _MSG_NO_TOURNAMENT_INPUT_WINDOW = { 9, "Cannot open Tournament-input-window!" };
- const struct FC_Type _MSG_NO_PAIRING = { 10, "No pairings possible!\nToo much rounds?" };
- const struct FC_Type _MSG_NO_PRINTER = { 11, "Cannot connect to printer!" };
- const struct FC_Type _MSG_PAGENR = { 12, "Page" };
- const struct FC_Type _MSG_NAME_OUTPUT = { 13, "Name" };
- const struct FC_Type _MSG_DWZ_OUTPUT = { 14, "Rating" };
- const struct FC_Type _MSG_CHESSCLUB_OUTPUT = { 15, "Chess-club" };
- const struct FC_Type _MSG_STREET_OUTPUT = { 16, "Home" };
- const struct FC_Type _MSG_VILLAGE_OUTPUT = { 17, "Address" };
- const struct FC_Type _MSG_BIRTHDAY_OUTPUT = { 18, "Birthday" };
- const struct FC_Type _MSG_PHONE_OUTPUT = { 19, "Phone" };
- const struct FC_Type _MSG_PLAYER_LIST_TITLE = { 20, "List of players" };
- const struct FC_Type _MSG_RESULT_OUTPUT = { 21, "Result" };
- const struct FC_Type _MSG_WHITE_OUTPUT = { 22, "White" };
- const struct FC_Type _MSG_BLACK_OUTPUT = { 23, "Black" };
- const struct FC_Type _MSG_ROUND_TITLE = { 24, "Games of round %ld" };
- const struct FC_Type _MSG_PLACE_OUTPUT = { 25, "Place" };
- const struct FC_Type _MSG_POINTS_OUTPUT = { 26, "Points" };
- const struct FC_Type _MSG_BUCHHOLZ_OUTPUT = { 27, "Buchholz" };
- const struct FC_Type _MSG_EXT_BUCHHOLZ_OUTPUT = { 28, "Ext.Bchh." };
- const struct FC_Type _MSG_SONNEBORN_BERGER_OUTPUT = { 29, "SnnBrgr." };
- const struct FC_Type _MSG_TABLE_TITLE = { 30, "Table of round %ld %s" };
- const struct FC_Type _MSG_TABLE_TITLE2 = { 31, "Table %s" };
- const struct FC_Type _MSG_RANKINGS_TITLE = { 32, "Ratings" };
- const struct FC_Type _MSG_NUMBER = { 33, "Nr." };
- const struct FC_Type _MSG_RANKINGS_TITLE2 = { 34, "List of rankings (round %ld)" };
- const struct FC_Type _MSG_PROGRESS_TABLE_TITLE = { 35, "Table of progress until round %ld" };
- const struct FC_Type _MSG_GAME_OUTPUT = { 36, "Opponent (Nr., Result, Color)" };
- const struct FC_Type _MSG_FREE_GAME_OUTPUT = { 37, " free" };
- const struct FC_Type _MSG_GONE_OUTPUT = { 38, " dropped" };
- const struct FC_Type _MSG_FREE_POINT_OUTPUT = { 39, "1 p. bye" };
- const struct FC_Type _MSG_FREE_GAME_OUTPUT2 = { 40, "free" };
- const struct FC_Type _MSG_NO_FIGHT_OUTPUT = { 41, "(np)" };
- const struct FC_Type _MSG_ROUND_INPUT_TITLE = { 42, "Input of games (round %ld)" };
- const struct FC_Type _MSG_NEW_PLAYER_REQUEST = { 43, "Games have already been paired!\nDo you really want to add new players?" };
- const struct FC_Type _MSG_MODIFY_PLAYER_REQUEST = { 44, "Games have already been paired!\nDo you really want to modify players?" };
- const struct FC_Type _MSG_DELETE_PLAYER_REQUEST = { 45, "Games have already been paired!\nDo you really want to delete players?\n"\
- "(Mark them as withdrawn.)" };
- const struct FC_Type _MSG_DELETE_THIS_PLAYER_REQUEST = { 46, "Do you really want to delete\nthe player %s?" };
- const struct FC_Type _MSG_THIS_PLAYER_GONE_REQUEST = { 47, "Do you really want to mark\n%s as withdrawn?" };
- const struct FC_Type _MSG_DONT_CARE_REQUEST_TITLE = { 48, "Don't care!" };
- const struct FC_Type _MSG_DONT_CARE_REQUEST = { 49, "Player %s\nhas already been marked as withdrawn!" };
- const struct FC_Type _MSG_OK = { 50, "Ok" };
- const struct FC_Type _MSG_OK_SC = { 51, "o" };
- const struct FC_Type _MSG_ERROR_REQUEST = { 52, "Error!" };
- const struct FC_Type _MSG_MEMORY_ERROR = { 53, "Out of memory!" };
- const struct FC_Type _MSG_SWISS_PAIRING = { 54, "Swiss pairing" };
- const struct FC_Type _MSG_RUNDENTURNIER = { 55, "Round Robin (FIDE-system)" };
- const struct FC_Type _MSG_RUTSCHSYSTEM = { 56, "Round Robin (shift-system)" };
- const struct FC_Type _MSG_TOURNAMENT_INPUT_TITLE = { 57, "Input of tournament-data" };
- const struct FC_Type _WND_PLAYER_ADD_TITLE = { 58, "Input of new players" };
- const struct FC_Type _MSG_WHITE_WINS_INPUT = { 59, "\033uW\033nhite wins" };
- const struct FC_Type _MSG_DRAW_INPUT = { 60, "\033uD\033nraw" };
- const struct FC_Type _MSG_BLACK_WINS_INPUT = { 61, "\033uB\033nlack wins" };
- const struct FC_Type _MSG_RESULT_MISSING_INPUT = { 62, "Result \033u\033nmissing" };
- const struct FC_Type _MSG_AUSGETRAGEN_INPUT = { 63, "\033uP\033nlayed" };
- const struct FC_Type _MSG_KAMPFLOS_INPUT = { 64, "\033uN\033not played" };
- const struct FC_Type _MSG_TOURNAMENT_MENU = { 65, "Project" };
- const struct FC_Type _MSG_TOURNAMENT_NEW_ITEM = { 66, "New" };
- const struct FC_Type _MSG_TOURNAMENT_LOAD_ITEM = { 67, "Load" };
- const struct FC_Type _MSG_TOURNAMENT_SAVE_ITEM = { 68, "Save" };
- const struct FC_Type _MSG_TOURNAMENT_SAVEAS_ITEM = { 69, "Save as" };
- const struct FC_Type _MSG_TOURNAMENT_ABOUT_ITEM = { 70, "About" };
- const struct FC_Type _MSG_TOURNAMENT_QUIT_ITEM = { 71, "Quit" };
- const struct FC_Type _MSG_PLAYER_MENU = { 72, "Players" };
- const struct FC_Type _MSG_PLAYER_ADD_ITEM = { 73, "Add" };
- const struct FC_Type _MSG_PLAYER_IMPORT_ITEM = { 74, "Import" };
- const struct FC_Type _MSG_PLAYER_MODIFY_ITEM = { 75, "Modify" };
- const struct FC_Type _MSG_PLAYER_DELETE_ITEM = { 76, "Delete" };
- const struct FC_Type _MSG_ROUND_MENU = { 77, "Round" };
- const struct FC_Type _MSG_ROUND_PAIRINGS_ITEM = { 78, "Make pairings" };
- const struct FC_Type _MSG_ROUND_PAIRINGS_SWISS_SUB = { 79, "Swiss pairing" };
- const struct FC_Type _MSG_ROUND_PAIRINGS_RROBIN_SUB = { 80, "Round Robin (FIDE-system)" };
- const struct FC_Type _MSG_ROUND_PAIRINGS_SLIDE_SUB = { 81, "Round Robin (shift-system)" };
- const struct FC_Type _MSG_ROUND_RESULTS_ITEM = { 82, "Enter results" };
- const struct FC_Type _MSG_OUTPUT_MENU = { 83, "Output" };
- const struct FC_Type _MSG_OUTPUT_PLAYERS_ITEM = { 84, "Player-list" };
- const struct FC_Type _MSG_OUTPUT_PLAYERS_SHORT_SUB = { 85, "short" };
- const struct FC_Type _MSG_OUTPUT_PLAYERS_LONG_SUB = { 86, "long" };
- const struct FC_Type _MSG_OUTPUT_RANKINGS_ITEM = { 87, "Rankings" };
- const struct FC_Type _MSG_OUTPUT_ROUND_ITEM = { 88, "Round" };
- const struct FC_Type _MSG_OUTPUT_TABLE_ITEM = { 89, "Table" };
- const struct FC_Type _MSG_OUTPUT_TABLE_ALL_SUB = { 90, "All" };
- const struct FC_Type _MSG_OUTPUT_TABLE_SENIORS_SUB = { 91, "Seniors" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORS_SUB = { 92, "Juniors" };
- const struct FC_Type _MSG_OUTPUT_TABLE_WOMEN_SUB = { 93, "Women" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORSA_SUB = { 94, "Juniors (A)" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORSB_SUB = { 95, "Juniors (B)" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORSC_SUB = { 96, "Juniors (C)" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORSD_SUB = { 97, "Juniors (D)" };
- const struct FC_Type _MSG_OUTPUT_TABLE_JUNIORSE_SUB = { 98, "Juniors (E)" };
- const struct FC_Type _MSG_OUTPUT_PROGRESSTABLE_ITEM = { 99, "Table of progress" };
- const struct FC_Type _MSG_OUTPUT_DWZ_ITEM = { 100, "DWZ-report" };
- const struct FC_Type _MSG_OUTPUT_CROSSTABLE_ITEM = { 101, "Cross-table" };
- const struct FC_Type _MSG_OUTPUT_CROSSTABLE_ASC_SUB = { 102, "Ascii" };
- const struct FC_Type _MSG_OUTPUT_CROSSTABLE_TEX_SUB = { 103, "TeX" };
- const struct FC_Type _MSG_OUTPUT_PLAYERCARDS_ITEM = { 104, "Player-cards" };
- const struct FC_Type _MSG_OUTPUT_PLAYERCARDS_ASC_SUB = { 105, "Ascii" };
- const struct FC_Type _MSG_OUTPUT_PLAYERCARDS_TEX_SUB = { 106, "TeX" };
- const struct FC_Type _MSG_PREFS_MENU = { 107, "Preferences" };
- const struct FC_Type _MSG_PREFS_TMODE_ITEM = { 108, "scoring" };
- const struct FC_Type _MSG_PREFS_TMODE_SIMPLE_SUB = { 109, "Simple" };
- const struct FC_Type _MSG_PREFS_TMODE_BUCHHOLZ_SUB = { 110, "Buchholz" };
- const struct FC_Type _MSG_PREFS_TMODE_EXTBCHHLZ_SUB = { 111, "Buchholz (extended)" };
- const struct FC_Type _MSG_PREFS_TMODE_SONNEBORN_SUB = { 112, "Sonneborn-Berger" };
- const struct FC_Type _MSG_PREFS_OUT_ITEM = { 113, "Output-Device" };
- const struct FC_Type _MSG_PREFS_OUT_SCREEN_SUB = { 114, "Screen" };
- const struct FC_Type _MSG_PREFS_OUT_PRTDRAFT_SUB = { 115, "Printer (Draft)" };
- const struct FC_Type _MSG_PREFS_OUT_PRTLQ_SUB = { 116, "Printer (LQ)" };
- const struct FC_Type _MSG_PREFS_OUT_FILE_SUB = { 117, "File" };
- const struct FC_Type _MSG_PREFS_SETGAMES = { 118, "Set Games" };
- const struct FC_Type _MSG_PREFS_MAKEICONS_ITEM = { 119, "Make icons" };
- const struct FC_Type _MSG_PREFS_SAVEWINDOWSETTINGS = { 120, "Save window settings" };
- const struct FC_Type _MSG_SPECIAL_MENU = { 121, "Special" };
- const struct FC_Type _MSG_NUM_PLAYERS_OUTPUT = { 122, "Players:" };
- const struct FC_Type _MSG_NUM_ROUNDS_OUTPUT = { 123, "Rounds:" };
- const struct FC_Type _MSG_TOURNAMENT_NAME_OUTPUT = { 124, "Tournamentname:" };
- const struct FC_Type _MSG_TOURNAMENT_FILE_OUTPUT = { 125, "Tournamentfile:" };
- const struct FC_Type _MSG_TOURNAMENT_MODE_OUTPUT = { 126, "Tournamentmode:" };
- const struct FC_Type _MSG_CANCEL_INPUT = { 127, "Cancel" };
- const struct FC_Type _MSG_CANCEL_SC = { 128, "c" };
- const struct FC_Type _MSG_OK_INPUT = { 129, "Ok" };
- const struct FC_Type _MSG_TOURNAMENT_NAME_INPUT = { 130, "Tournamentname" };
- const struct FC_Type _MSG_NAME_INPUT = { 131, "Name" };
- const struct FC_Type _MSG_STREET_INPUT = { 132, "Home" };
- const struct FC_Type _MSG_VILLAGE_INPUT = { 133, "Address" };
- const struct FC_Type _MSG_CHESS_CLUB_INPUT = { 134, "Chess-club" };
- const struct FC_Type _MSG_PHONE_INPUT = { 135, "Phone" };
- const struct FC_Type _MSG_BIRTHDAY_INPUT = { 136, "Birthday" };
- const struct FC_Type _MSG_DWZ_INPUT = { 137, "Rating" };
- const struct FC_Type _MSG_ELO_INPUT = { 138, "ELO" };
- const struct FC_Type _MSG_SENIORS_INPUT = { 139, "Senior" };
- const struct FC_Type _MSG_JUNIORS_INPUT = { 140, "Junior" };
- const struct FC_Type _MSG_WOMEN_INPUT = { 141, "Woman" };
- const struct FC_Type _MSG_JUNIORSA_INPUT = { 142, "Junior (A)" };
- const struct FC_Type _MSG_JUNIORSB_INPUT = { 143, "Junior (B)" };
- const struct FC_Type _MSG_JUNIORSC_INPUT = { 144, "Junior (C)" };
- const struct FC_Type _MSG_JUNIORSD_INPUT = { 145, "Junior (D)" };
- const struct FC_Type _MSG_JUNIORSE_INPUT = { 146, "Junior (E)" };
- const struct FC_Type _MSG_MISSING_PLAYER_NAME = { 147, "Players name is missing!" };
- const struct FC_Type _MSG_BIRTHDAY_ERROR = { 148, "Error in birthday of player %s!" };
- const struct FC_Type _MSG_ABOUT_PERMISSION = { 149, "This program is governed by the terms and conditions of the GNU General "\
- "Public License. A copy should have come with this distribution. (See the "\
- "file COPYING.) In that license it is made clear that you are welcome to "\
- "redistribute either verbatim or modified copies of the program and the "\
- "documentation under certain conditions. Further you are told that this "\
- "program comes with ABSOLUTELY NO WARRANTY!\n\n\n" };
- const struct FC_Type _MSG_ABOUT_THANKS1 = { 150, "My thanks go to\n"\
- "\n"\
- " Stefan Stuntz for MUI. Finally the user interface should be satisfying "\
- "for everyone.\n"\
- "\n"\
- " Reinhard Spisser and Sebastiano Vigna for the Amiga-version of texinfo. "\
- "The documentation is written using this.\n"\
- "\n"\
- " The Free Software Foundation for creating texinfo and many other "\
- "excellent programs.\n\n" };
- const struct FC_Type _MSG_ABOUT_THANKS2 = { 151, " The Betatesters: Kai Bolay, Frank Geider, Franz Hemmer, Jürgen Lang "\
- "(Quarvon), Christian Soltenborn and Volker Zink (The_Zinker)\n"\
- "\n"\
- " My friend Mathias Moersch for his help in the manual's english "\
- "translation: Spending nearly 6 years in the USA finally does some good!\n"\
- "\n"\
- " The people of #AmigaGer for answering many stupid questions and lots of "\
- "fun, for example PowerStat (Kai Hoffmann), ZZA (Bernhard Möllemann), "\
- "Stargazer (Petra Zeidler), stefanb (Stefan Becker), Tron (Mathias "\
- "Scheler) and ill (Markus Illenseer)\n"\
- "\n"\
- " Commodore for the Amiga and Kickstart V2.x. Keep on developing and I'll "\
- "be an Amiga-user the next 8 years too. :-)\n"\
- "\n"\
- " Douglas Adams and Tom Sharpe for creating Arthur Dent and Tom Sharpe. "\
- "My favourite (anti)-heroes!\n"\
- "\n"\
- " and to my parents for their bath-tub: There's no better place to think "\
- "about something ;-)" };
- const struct FC_Type _MSG_NO_BIRTHDAY = { 152, "Player %s doesn't have a birthdate!\n"\
- "Please select an age-group or make another decision:" };
- const struct FC_Type _MSG_NO_BIRTHDAY_GADGETS = { 153, "20 or younger|21-25|26 or older|Modify|Skip|Cancel" };
- const struct FC_Type _MSG_DWZ_TITLE = { 154, "DWZ-Ratings" };
- const struct FC_Type _MSG_ABOUT_TITLE = { 155, "Informations" };
- const struct FC_Type _MSG_ELO_OUTPUT = { 156, "ELO" };
- const struct FC_Type _MSG_SENIOR_SHORT = { 157, "S" };
- const struct FC_Type _MSG_JUNIOR_SHORT = { 158, "J" };
- const struct FC_Type _MSG_WOMAN_SHORT = { 159, "W" };
- const struct FC_Type _MSG_JUNIORA_SHORT = { 160, "A" };
- const struct FC_Type _MSG_JUNIORB_SHORT = { 161, "B" };
- const struct FC_Type _MSG_JUNIORC_SHORT = { 162, "C" };
- const struct FC_Type _MSG_JUNIORD_SHORT = { 163, "D" };
- const struct FC_Type _MSG_JUNIORE_SHORT = { 164, "E" };
- const struct FC_Type _MSG_DATE_FORMAT = { 165, "(dd.mm.yyyy)" };
- const struct FC_Type _KEY_PROJECT_LOAD = { 166, "L" };
- const struct FC_Type _KEY_PROJECT_SAVE = { 167, "S" };
- const struct FC_Type _KEY_PROJECT_SAVE_AS = { 168, "A" };
- const struct FC_Type _KEY_PROJECT_ABOUT = { 169, "I" };
- const struct FC_Type _KEY_PLAYERS_NEW = { 170, "N" };
- const struct FC_Type _KEY_PLAYERS_MODIFY = { 171, "M" };
- const struct FC_Type _WND_PLAYER_MODSEL_TITLE = { 172, "Select a player to modify" };
- const struct FC_Type _MSG_TEXFILE_SELECTION = { 173, "TeX-file-selection" };
- const struct FC_Type _MSG_NO_NEW_PLAYERS_ROUND_ROBIN = { 174, "Games have already been paired.\nNo new players possible!" };
- const struct FC_Type _MSG_NO_NEW_PLAYERS_SWISS_PAIR = { 175, "It isn't possible to enter new players,\nwhen round 1 is finished!" };
- const struct FC_Type _WND_PLAYER_MODIFY_TITLE = { 176, "Player modification" };
- const struct FC_Type _WND_PLAYER_DELSEL_TITLE = { 177, "Select a player to delete" };
- const struct FC_Type _MSG_NO_PLAYER_DELETE = { 178, "No players may be deleted\n in a round robin tournament!" };
- const struct FC_Type _MSG_YES_NO_CANCEL = { 179, "Yes|No|Cancel" };
- const struct FC_Type _WND_GAMESET_TITLE = { 180, "Setting of games" };
- const struct FC_Type _BUTTON_DELETE_TITLE = { 181, "Delete" };
- const struct FC_Type _BUTTON_DELETE_SC = { 182, "d" };
- const struct FC_Type _MSG_ONEPOINTBYE_VERYSHORT = { 183, "F" };
- const struct FC_Type _WND_ASCIIFILE_TITLE = { 184, "Output file selection" };
- const struct FC_Type _WND_RNDSEL_TITLE = { 185, "Round selection" };
- const struct FC_Type _WND_RNDSEL_TEXT = { 186, "Please select a round number" };
- const struct FC_Type _ERRMSG_CANNOT_OPEN_WINDOW = { 187, "Canot open window: %s" };
- const struct FC_Type _MUIERR_OK = { 188, "Ok" };
- const struct FC_Type _MUIERR_OutOfMemory = { 189, "Out of memory" };
- const struct FC_Type _MUIERR_OutOfGfxMemory = { 190, "Out of chip memory" };
- const struct FC_Type _MUIERR_InvalidWindowObject = { 191, "Invalid window object" };
- const struct FC_Type _MUIERR_MissingLibrary = { 192, "Missing library" };
- const struct FC_Type _MUIERR_NoARexx = { 193, "Cannot create ARexx port" };
- const struct FC_Type _MUIERR_SingleTask = { 194, "Application is already running" };
- const struct FC_Type _MUIERR_Unknown = { 195, "Unknown error" };
- const struct FC_Type _MSG_INVALID_ONEPOINTBYE = { 196, "Number of active players is even:\n"\
- "No one point bye allowed." };
- const struct FC_Type _MSG_INVALID_GAME = { 197, "Players %s\n"\
- "and %s\n"\
- "have already been paired in round %ld." };
- const struct FC_Type _MSG_INVALID_COLORS = { 198, "Players %s\n"\
- "and %s\n"\
- "had %s pieces in the last two rounds.\n\n"\
- "Do you really want to pair them?" };
- const struct FC_Type _MSG_PLAYER_WITHDRAWN = { 199, "Player %s has withdrawn\n"\
- "and cannot be set." };
- const struct FC_Type _MSG_INVALID_PLAYER = { 200, "Player %s is already set as\n"\
- "opponent of player %s." };
- const struct FC_Type _MSG_HAD_ONEPOINTBYE = { 201, "Player %s already\n"\
- "had an one point bye." };
- const struct FC_Type _BUTTON_MODIFY_TITLE = { 202, "Modify" };
- const struct FC_Type _BUTTON_MODIFY_SC = { 203, "m" };
- const struct FC_Type _RADIO_RESULT_TITLE = { 204, "Result" };
- const struct FC_Type _RADIO_MODE_TITLE = { 205, "Mode" };
- const struct FC_Type _BUTTON_FINISH = { 206, "Finish" };
- const struct FC_Type _BUTTON_FINISH_SC = { 207, "f" };
- const struct FC_Type _CYCLE_CHAOSCOLORS = { 208, "Chaos selects colors" };
- const struct FC_Type _CYCLE_USERCOLORS = { 209, "User determines colors" };
- const struct FC_Type _MSG_COLORS_SET = { 210, "(cd)" };
- const struct FC_Type _MSG_INVALID_COLOR = { 211, "Player %s already had\n"\
- "the %s pieces in the last two rounds.\n"\
- "Do you really want this?" };
- const struct FC_Type _KEY_RESULT_WHITE = { 212, "w" };
- const struct FC_Type _KEY_RESULT_DRAW = { 213, "d" };
- const struct FC_Type _KEY_RESULT_BLACK = { 214, "b" };
- const struct FC_Type _KEY_RESULT_MISSING = { 215, "m" };
- const struct FC_Type _KEY_RESULT_PLAYED = { 216, "p" };
- const struct FC_Type _KEY_RESULT_NPLAYED = { 217, "n" };
- const struct FC_Type _MSG_PlayerExists = { 218, "A player %s already exists." };
- const struct FC_Type _BUTTONS_DELETE_THIS_PLAYER_REQUEST = { 219, "Delete him|Skip him|Cancel" };
- const struct FC_Type _BUTTONS_THIS_PLAYER_GONE_REQUEST = { 220, "Withdraw him|Skip him|Cancel" };
- const struct FC_Type _MSG_ImportPlayersWinTitle = { 221, "Please select players to import" };
- const struct FC_Type _MSG_ImportPlayersOkButton = { 222, "Import" };
- const struct FC_Type _MSG_ImportPlayersOkButtonSC = { 223, "i" };
- const struct FC_Type _Button_Reverse = { 224, "Reverse" };
- const struct FC_Type _Button_Reverse_SC = { 225, "r" };
- const struct FC_Type _MSG_PrinterError = { 226, "Cancelling output:\nPrinter trouble." };
- const struct FC_Type _MSG_WINNERPOINTS = { 227, "Winner points:" };
- const struct FC_Type _MSG_DRAWPOINTS = { 228, "Draw points:" };
-
- static struct Catalog *Chaos_Catalog = NULL;
- static struct FC_Type *Chaos_OwnCatalog = NULL;
- static LONG Chaos_OwnStrings;
- static LONG Chaos_OwnBytes;
-
- void OpenChaosCatalog(struct Locale *loc, STRPTR language)
- { LONG tag, tagarg;
- extern struct Library *LocaleBase;
- extern struct Library *IFFParseBase;
- extern void CloseChaosCatalog(void);
-
- CloseChaosCatalog(); /* Not needed if the programmer pairs Open-()
- and CloseCatalog() right, but does no harm. */
- if (language == NULL)
- { tag = TAG_IGNORE;
- }
- else
- { tag = OC_Language;
- tagarg = (LONG) language;
- }
- if (LocaleBase != NULL && Chaos_Catalog == NULL)
- { Chaos_Catalog = OpenCatalog(loc, (STRPTR) "Chaos.catalog",
- OC_BuiltInLanguage, Chaos_BuiltInLanguage,
- tag, tagarg,
- OC_Version, Chaos_Version,
- TAG_DONE);
- }
- if (LocaleBase == NULL && IFFParseBase != NULL && language != NULL &&
- Stricmp(language, Chaos_BuiltInLanguage) != 0)
- { struct IFFHandle *iffhandle;
- char path[128]; /* Enough to hold 4 path items (dos.library 3.0) */
-
- if ((iffhandle = AllocIFF()) != NULL)
- { /* Trying to open the catalog */
- strcpy(path, "Catalogs");
- AddPart((STRPTR) path, language, sizeof(path));
- AddPart((STRPTR) path, (STRPTR) "Chaos.catalog", sizeof(path));
- if ((iffhandle->iff_Stream = Open((STRPTR) path, MODE_OLDFILE))
- == NULL)
- { strcpy(path, "Locale:Catalogs");
- AddPart((STRPTR) path, language, sizeof(path));
- AddPart((STRPTR) path, (STRPTR) "Chaos.catalog", sizeof(path));
- iffhandle->iff_Stream = Open((STRPTR) path, MODE_OLDFILE);
- }
-
- if (iffhandle->iff_Stream)
- { InitIFFasDOS(iffhandle);
- if (!OpenIFF(iffhandle, IFFF_READ))
- { if (!PropChunk(iffhandle, MAKE_ID('C','T','L','G'),
- MAKE_ID('S','T','R','S')))
- { struct StoredProperty *sp;
- int error;
-
- for (;;)
- { if ((error = ParseIFF(iffhandle, IFFPARSE_STEP))
- == IFFERR_EOC)
- { continue;
- }
- if (error != 0)
- { break;
- }
-
- if (sp = FindProp(iffhandle, MAKE_ID('C','T','L','G'),
- MAKE_ID('S','T','R','S')))
- { LONG *ptr;
- LONG BytesToScan, StrLength;
-
- /* First scan: Check the number of strings */
- /* Note that this assumes that the strings are padded */
- /* to a longword boundary! */
- Chaos_OwnBytes = 0;
- Chaos_OwnStrings = 0;
- BytesToScan = sp->sp_Size;
- ptr = sp->sp_Data;
- while (BytesToScan > 0)
- { ++Chaos_OwnStrings;
- ++ptr; /* Skip ID */
- StrLength = *ptr+1; /* NUL-Byte! */
- Chaos_OwnBytes += StrLength;
- ptr += 1+(StrLength+3)/4; /* Skip Length and String*/
- BytesToScan -= 8+((StrLength+3)/4)*4;
- }
-
- /* Marginal check: BytesToScan has to be 0! */
- if (BytesToScan == 0)
- { char *cptr;
- LONG i;
-
- if (Chaos_OwnCatalog = (struct FC_Type *)
- AllocMem(Chaos_OwnStrings*sizeof(struct FC_Type)+Chaos_OwnBytes,
- MEMF_ANY))
- { /* Second scan: Copy the strings and their ID's */
- cptr = (char *) &Chaos_OwnCatalog[Chaos_OwnStrings];
- BytesToScan = sp->sp_Size;
- ptr = sp->sp_Data;
- i = 0;
- while (BytesToScan > 0)
- { Chaos_OwnCatalog[i].ID = *(ptr++);
- Chaos_OwnCatalog[i].Str = (STRPTR) cptr;
- StrLength = *ptr+1; /* NUL-Byte! */
- ptr++;
- strncpy(cptr, (char *) ptr, StrLength);
- /* Not more, not less bytes! */
- cptr+=StrLength;
- ptr += (StrLength+3)/4;
- BytesToScan -= 8+((StrLength+3)/4)*4;
- ++i;
- }
- break;
- }
- }
- }
- }
- }
- CloseIFF(iffhandle);
- }
- Close(iffhandle->iff_Stream);
- }
-
- FreeIFF(iffhandle);
- }
- }
- }
-
-
- void CloseChaosCatalog(void)
- { if (LocaleBase != NULL)
- { CloseCatalog(Chaos_Catalog);
- }
- Chaos_Catalog = NULL;
- if (Chaos_OwnCatalog != NULL)
- { FreeMem(Chaos_OwnCatalog,
- Chaos_OwnStrings*sizeof(struct FC_Type)+Chaos_OwnBytes);
- Chaos_OwnCatalog = NULL;
- }
- }
-
-
- STRPTR GetChaosString(APTR fcstr)
- { STRPTR defaultstr = NULL;
- LONG strnum, i;
-
- strnum = ((struct FC_Type *) fcstr)->ID;
- defaultstr = ((struct FC_Type *) fcstr)->Str;
-
- if (Chaos_Catalog == NULL)
- { if (Chaos_OwnCatalog != NULL)
- { for (i = 0; i < Chaos_OwnStrings; i++)
- { if (Chaos_OwnCatalog[i].ID == strnum)
- { return(Chaos_OwnCatalog[i].Str);
- }
- }
- }
- return(defaultstr);
- }
- return(GetCatalogStr(Chaos_Catalog, strnum, defaultstr));
- }
-